﻿Imports Publics

Public Class clsBienMoiTruong
    Public ReadOnly Property PH_DM_LocCotMa() As DieuKienLocCotMa
        Get
            Dim obj = GetBienMoiTruong("PH_DM_LocCotMa")
            '
            If obj Is Nothing Then
                obj = New DM_BienMoiTruong
                With obj
                    .ID = "PH_DM_LocCotMa"
                    .TenCauHinh = "PH_DM_LocCotMa"
                    .GiaTriCauHinh = ""
                    .GhiChu = "Cách lọc cột mã trên danh mục theo điều kiện: startwith hay contains"
                    .AllowDelete = False
                    .AllowEdit = True

                    .InUsed = True
                    .EditedOn = dbTV.GetDateTimeServer
                End With
                dbTV.DM_BienMoiTruongs.InsertOnSubmit(obj)
                iSubmitChange()
                'Load_DMBienMoiTruong()
            End If
            If obj IsNot Nothing AndAlso IsNumeric(obj.GiaTriCauHinh) Then
                Return CType(obj.GiaTriCauHinh, DieuKienLocCotMa)
            Else
                Return DieuKienLocCotMa.StartWith
            End If
        End Get
    End Property
End Class
Public Enum DieuKienLocCotMa
    StartWith = 0
    Contains = 1
End Enum